import pandas as pd
list_result=[]
check_group=['账号','口令','补丁漏洞','远程登录','安全配置','日志审计']
new_dict={
    'ip':'',
    'zhgl':'', #帐号管理
     'klgl':'',#口令管理
     'xtfu':'',#系统服务
     'ldgl':'正常',#补丁漏洞管理
     'aqpz':'',#安全配置
     'rzpz':''#日志审计

}
def check_result(a):
    return a=='不合规'

class pl_class():
    # 初始化方法
    def __init__(self, data_path, sheetname):
        # 定义一个属性接收文件路径
        self.data_path = data_path
        # 定义一个属性接收工作表名称
        self.sheetname = sheetname
        # 表读取数据
        self.Consumption = pd.read_excel(data_path, sheet_name=sheetname)
    def get_all_ip(self):
        Consumption_check_result = self.Consumption.loc[self.Consumption.检查结果.apply(check_result)]
if __name__ == "__main__":
    data_path = "test.xlsx"
    sheetname = "Sheet1"
    pl_class(data_path, sheetname)
    #     # print(datas)